﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

using QingzimaScenario;
using QingzimaLogicModel;

namespace QingzimaWebClient.Controllers
{
    public class HoutaiGongsijieshaoController : Controller
    {
        //
        // GET: /HoutaiGongsijieshao/

        public ActionResult Index()
        {
            int id = 1;
            GongsijieshaoLM gongsijieshaoLM = GongsijieshaoScenario.HuoquByID(id);
            ViewBag.Neirong = gongsijieshaoLM.Gongsijieshao;
            return View(gongsijieshaoLM);
        }

        [HttpPost]
        [ValidateInput(false)]
        public ActionResult Index(GongsijieshaoLM gongsijieshaoLM)
        {
            gongsijieshaoLM.ID = 1;
            gongsijieshaoLM.Gongsijieshao = Request.Form.Get("HtmlTextArea");
            GongsijieshaoScenario.Tianjia(gongsijieshaoLM);
            return RedirectToAction("Index");
        }
    }
}
